package cn.stylefeng.guns.modular.shuheng.mapper;

import cn.stylefeng.guns.modular.shuheng.entity.Files;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;


/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zhengpp
 * @since 2021-03-19
 */
public interface FilesMapper extends BaseMapper<Files> {
    Page<Map<String, Object>> selectFiles(@Param("page") Page page,@Param("condition")String condition, @Param("parentId")Long parentId,@Param("year")Integer year,@Param("level")Integer level,@Param("city")Long city,@Param("county")Long county,@Param("score") BigDecimal score,@Param("status")Integer status,@Param("quarterArr")String[] quarterArr);

    Files findByDataId(@Param("dataId") Long dataId);

    Files findByDataIdAndUser(@Param("dataId") Long dataId,@Param("regionLevel") Integer regionLevel,@Param("province") Long province,@Param("city") Long city,@Param("county") Long county);

    List<Files> listByUser(@Param("regionLevel") Integer regionLevel,@Param("province") Long province,@Param("city") Long city,@Param("county") Long county,@Param("year") Integer year,@Param("monthArr")String[] monthArr);

    List<Map<String, Object>> listExcelFiles(@Param("condition")String condition, @Param("parentId")Long parentId,@Param("year")Integer year,@Param("level")Integer level,@Param("city")Long city,@Param("county")Long county,@Param("score") BigDecimal score,@Param("status")Integer status,@Param("quarterArr")String[] quarterArr);

    List<Files> listByDept(@Param("deptId") Long deptId);

    List<Map<String,Object>> listYear();

    List<Map<String,Object>> listProvinceProblemByFileIds(@Param("fileIds")String[] fileIds);

    List<Map<String,Object>> listCityProblemByFileIds(@Param("fileIds")String[] fileIds);
}
